import request from '@/utils/processRequest';

// 左侧单位数
export function listEnterprise(data) {
  return request({
    url: '/capital/listEnterprise',
    method: 'post',
    data
  });
}

// 获取修改记录
export function getProjectBudgetLog(data) {
  return request({
    url: 'project/projectBudgetLog',
    method: 'post',
    data
  });
}
// 获取表头

export function getHeader(data) {
  return request({
    url: 'produce/header',
    method: 'post',
    data
  });
}

// 获取表头
export function getData(data) {
  return request({
    url: 'produce/data',
    method: 'post',
    data
  });
}

// 模糊匹配
export function getProgramList(data) {
  return request({
    url: 'capital/getProgramList',
    method: 'post',
    data
  });
}

// 共同接口
export function doFormMethod(url, data) {
  return request({
    url: url,
    method: 'post',
    data
  });
}

export function getAvailableProgram(data) {
  return request({
    url: '/project/availableProgram',
    method: 'post',
    data
  });
}

// 替换
export function replaceProgram(data) {
  return request({
    url: 'project/replaceProgram',
    method: 'post',
    data
  });
}

// 历史中心

export function programLog(data) {
  return request({
    url: 'project/programLog',
    method: 'post',
    data
  });
}

// 下载
export function exportExcel(data) {
  return request({
    url: 'produce/exportExcel',
    method: 'post',
    data,
    responseType: 'blob' // 返回格式，默认json，可选arraybuffer、blob、document、json、text、stream
  });
}

// 删除

export function deleteProgram(data) {
  return request({
    url: '/project/setProgramStatus',
    method: 'post',
    data
  });
}

